<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/*
| -------------------------------------------------------------------------
| URI ROUTING
| -------------------------------------------------------------------------
| This file lets you re-map URI requests to specific controller functions.
|
| Typically there is a one-to-one relationship between a URL string
| and its corresponding controller class/method. The segments in a
| URL normally follow this pattern:
|
|	example.com/class/method/id/
|
| In some instances, however, you may want to remap this relationship
| so that a different class/function is called than the one
| corresponding to the URL.
|
| Please see the user guide for complete details:
|
|	http://codeigniter.com/user_guide/general/routing.html
|
| -------------------------------------------------------------------------
| RESERVED ROUTES
| -------------------------------------------------------------------------
|
| There area two reserved routes:
|
|	$route['default_controller'] = 'welcome';
|
| This route indicates which controller class should be loaded if the
| URI contains no data. In the above example, the "welcome" class
| would be loaded.
|
|	$route['404_override'] = 'errors/page_missing';
|
| This route will tell the Router what URI segments to use if those provided
| in the URL cannot be matched to a valid route.
|
*/

$route['default_controller'] = "home/index";
$route['404_override'] = '';

$route['home'] = "home/index";
$route['thoi-tiet/(\d+)'] = "home/get_weather/$1";


$route['thong-tin-doanh-nghiep'] = "home/company";
$route['thong-tin-doanh-nghiep/page/(\d+)'] = "home/company/$1";

$route['hoi-dap'] = "faq/index";
$route['hoi-dap/page/(\d+)'] = "faq/index/$1";
$route['hoi-dap/tim-kiem'] = "faq/search/$1"; //tim kiem Rao Vat (không có param).

$route['video'] = "video/index";
$route['video/page/(\d+)'] = "video/index/$1";
$route['video/tim-kiem/(\d+)'] = "video/index/$1";

$route['rao-vat'] = "adv/index";
$route['rao-vat/page/(\d+)'] = "adv/index/$1";
$route['rao-vat/dang-tin'] = "adv/add";
$route['rao-vat/([\w,\-,\.,\d]+).html'] = "adv/adv_details/$1"; //chi tiet
$route['rao-vat/tim-kiem'] = "adv/search/$1"; //tim kiem Rao Vat (không có param).
$route['rao-vat/tim-kiem/(.*)'] = "adv/search/$1/$2"; //tim kiem Rao Vat (có param).
$route['rao-vat/upload'] = "adv/upload";

$route['tin-xnk'] = "news/index";
$route['tin-xnk/page/(\d+).html'] = "news/index/$1";
$route['tin-xnk/([\w,\-,\.,\d]+)'] = "news/news_details/$1";
$route['van-ban-phap-quy'] = "docs/index";
$route['van-ban-phap-quy/page/(\d+).html'] = "docs/index/$1";
//$route['van-ban-phap-quy/([\w,\-,\.,\d]+)'] = "docs/index/$1"; //van-ban-phap-quy + cate
$route['van-ban-phap-quy/tim-kiem'] = "docs/search/$1"; //tim kiem Rao Vat (không có param).
$route['van-ban-phap-quy/([\w,\-,\.,\d]+)/page/(\d+).html'] = "docs/index/$1/$2"; //van-ban-phap-quy + cate (with paging).


$route['thu-tuc-hai-quan'] = "c_customs_procedures/index";
$route['thu-tuc-hai-quan/([\w,\-,\.,\d]+)'] = "c_customs_procedures/detail/$1";
$route['thu-tuc-hai-quan/page/(\d+)'] = "c_customs_procedures/index/(\d+)";
$route['thu-tuc-hai-quan/tim-kiem/(\d+)'] = "c_customs_procedures/index/(\d+)";

$route['nghiep-vu-giao-nhan'] = "forwarding/index";
$route['nghiep-vu-giao-nhan/page/(\d+)'] = "forwarding/index/(\d+)";
$route['nghiep-vu-giao-nhan/tim-kiem/(\d+)'] = "forwarding/index/(\d+)";
$route['nghiep-vu-giao-nhan/([\w,\-,\.,\d]+)'] = "forwarding/detail/$1";

$route['kien-thuc-xnk'] = "knowledge/index";
$route['kien-thuc-xnk/page/(\d+)'] = "knowledge/index/(\d+)";
$route['kien-thuc-xnk/tim-kiem/(\d+)'] = "knowledge/index/(\d+)";
$route['kien-thuc-xnk/([\w,\-,\.,\d]+)'] = "knowledge/detail/$1";

$route['nghiep-vu-khac'] = "news/index";
$route['nghiep-vu-khac/page/(\d+).html'] = "news/index/$1";
$route['nghiep-vu-khac/([\w,\-,\.,\d]+)'] = "news/index/$1"; //nghiep-vu-khac + cate
$route['nghiep-vu-khac/([\w,\-,\.,\d]+)/page/(\d+).html'] = "news/index/$1/$2"; //nghiep-vu-khac + cate (with paging).
$route['nghiep-vu-khac/([\w,\-]+)/([\w,\-,\.,\d]+)'] = "news/news_details/$1/$2";

$route['tim-kiem'] = "search/index";
$route['tim-kiem/(.*)'] = "search/index/$1/$2";
$route['tim-kiem-ajax/(.*)'] = "search/paging_search/$1/$2/$3/$4/$5";

// "Xem thêm" trên mobile
$route['xem-them-mobile/(.*)'] = "news/paging_mobile/$1/$2/$3";

//admin home
$route['admin_home'] = "admin_home/index";

//admin company (Thông Tin Doanh Nghiệp)
$route['admin_company/company_add/(\d+)'] = "admin_company/add/(\d+)";
$route['admin_company/company_edit'] = "admin_company/edit";
$route['admin_company/company_edit/(\d+)'] = "admin_company/edit/$1";
$route['admin_company/company_del/(\d+)'] = "admin_company/delete/$1";
$route['admin_company/(\d+)'] = "admin_company/index/$1";
$route['admin_company/delete_company/(\d+)'] = "admin_company/delete_company/$1";
$route['admin_company/search/(\d+)/(\d+)'] = "admin_company/search/$1/$2";

//admin docs (Văn Bản)
$route['admin_docs/docs_add/(\d+)'] = "admin_docs/add/(\d+)";
$route['admin_docs/docs_edit'] = "admin_docs/edit";
$route['admin_docs/docs_edit/(\d+)'] = "admin_docs/edit/$1";
$route['admin_docs/docs_del/(\d+)'] = "admin_docs/delete/$1";
$route['admin_docs/(\d+)'] = "admin_docs/index/$1";
$route['admin_docs/delete_docs/(\d+)'] = "admin_docs/delete_docs/$1";
$route['admin_docs/search/(\d+)/(\d+)'] = "admin_docs/search/$1/$2";

//admin news (Tin Tức)
$route['admin_news/news_add/(\d+)'] = "admin_news/add/(\d+)";
$route['admin_news/news_edit'] = "admin_news/edit";
$route['admin_news/news_edit/(\d+)'] = "admin_news/edit/$1";
$route['admin_news/news_del/(\d+)'] = "admin_news/delete/$1";
$route['admin_news/(\d+)'] = "admin_news/index/$1";
$route['admin_news/delete_news/(\d+)'] = "admin_news/delete_news/$1";
$route['admin_news/search/(\d+)/(\d+)'] = "admin_news/search/$1/$2";

//admin adv (Rao Vặt)
$route['admin_adv/adv_edit'] = "admin_adv/edit";
$route['admin_adv/adv_edit/(\d+)'] = "admin_adv/edit/$1";
$route['admin_adv/adv_del/(\d+)'] = "admin_adv/delete/$1";
$route['admin_adv/(\d+)'] = "admin_adv/index/$1";
$route['admin_adv/delete_adv/(\d+)'] = "admin_adv/delete_adv/$1";
$route['admin_adv/search/(\d+)/(\d+)'] = "admin_adv/search/$1/$2";

//admin faq (Hỏi đáp)
$route['admin_faq/faq_add/(\d+)'] = "admin_faq/add/(\d+)";
$route['admin_faq/faq_edit'] = "admin_faq/edit";
$route['admin_faq/faq_edit/(\d+)'] = "admin_faq/edit/$1";
$route['admin_faq/faq_del/(\d+)'] = "admin_faq/delete/$1";
$route['admin_faq/(\d+)'] = "admin_faq/index/$1";
$route['admin_faq/delete_faq/(\d+)'] = "admin_faq/delete_faq/$1";
$route['admin_faq/search/(\d+)/(\d+)'] = "admin_faq/search/$1/$2";

//admin news cate (Danh mục tin tức)
$route['admin_newscate/newscate_add/(\d+)'] = "admin_newscate/add/(\d+)";
$route['admin_newscate/newscate_edit/(\d+)'] = "admin_newscate/edit/$1";
$route['admin_newscate/news_editimages/(\d+)'] = "news_editimages/edit/$1";
$route['admin_newscate/newscate_del/(\d+)'] = "admin_newscate/delete/$1";
$route['admin_newscate/(\d+)'] = "admin_newscate/index/$1";

//admin adv cate (Danh mục Rao Vặt)
$route['admin_advcate/advcate_add/(\d+)'] = "admin_advcate/add/(\d+)";
$route['admin_advcate/advcate_edit/(\d+)'] = "admin_advcate/edit/$1";
$route['admin_advcate/advcate_del/(\d+)'] = "admin_advcate/delete/$1";
$route['admin_advcate/(\d+)'] = "admin_advcate/index/$1";

//admin faq cate
$route['admin_faqcate/faqcate_add/(\d+)'] = "admin_faqcate/add/(\d+)";
$route['admin_faqcate/faqcate_edit/(\d+)'] = "admin_faqcate/edit/$1";
$route['admin_faqcate/faqcate_del/(\d+)'] = "admin_faqcate/delete/$1";
$route['admin_faqcate/(\d+)'] = "admin_faqcate/index/$1";

//admin stats
$route['admin_news/memcache_set/'] = "admin_news/memcache_set/";

//be_user
$route['admin_be_user/be_user_add/(\d+)'] = "admin_be_user/add/(\d+)";
$route['admin_be_user/be_user_edit'] = "admin_be_user/edit";
$route['admin_be_user/be_user_edit/(\d+)'] = "admin_be_user/edit/$1";
$route['admin_be_user/be_user_del/(\d+)'] = "admin_be_user/delete/$1";
$route['admin_be_user/(\d+)'] = "admin_be_user/index/$1";
$route['admin_be_user/delete_be_user/(\d+)'] = "admin_be_user/delete_be_user/$1";
$route['admin_be_user/search/(\d+)/(\d+)'] = "admin_be_user/search/$1/$2";

//video
$route['admin_video'] = "admin_video/index";
$route['admin_video/(\d+)'] = "admin_video/index/(\d+)";
$route['admin_video/delete/(\d+)'] = "admin_video/delete/(\d+)";
$route['admin_video/get_video'] = "admin_video/get_video";

//contact_us
$route['admin_contact_us/contact_us_add/(\d+)'] = "admin_contact_us/add/(\d+)";
$route['admin_contact_us/contact_us_edit'] = "admin_contact_us/edit";
$route['admin_contact_us/contact_us_edit/(\d+)'] = "admin_contact_us/edit/$1";
$route['admin_contact_us/contact_us_del/(\d+)'] = "admin_contact_us/delete/$1";
$route['admin_contact_us/(\d+)'] = "admin_contact_us/index/$1";
$route['admin_contact_us/delete_contact_us/(\d+)'] = "admin_contact_us/delete_contact_us/$1";
$route['admin_contact_us/search/(\d+)/(\d+)'] = "admin_contact_us/search/$1/$2";

//async service
$route['sync-thoi-tiet'] = "async_services/sync_weather";
$route['sync-ty-gia'] = "async_services/sync_exchange_rate";
$route['sync-gia-vang'] = "async_services/sync_gold";

//async news
$route['async_news/update_lastest_news'] = "async_news/update_lastest_news";
$route['async_news/update_feature_news'] = "async_news/update_feature_news";
$route['async_news/set_category_to_cache'] = "async_news/set_category_to_cache";

//feed auto news
$route['admin_news_auto'] = "admin_news_auto/index";
$route['admin_news_auto/(\d+)'] = "admin_news_auto/index/$1";
$route['admin_news_auto/get_auto'] = "admin_news_auto/get_news_auto";
$route['admin_news_auto/delete'] = "admin_news_auto/delete_news_auto";
$route['admin_news_auto/news_edit/(\d+)'] = "admin_news_auto/news_edit/$1";
$route['admin_news_auto/approve_all'] = "admin_news_auto/approve_all";

//admin customs procedures
$route['admin_customs_procedures'] = "admin_customs_procedures/index";
$route['admin_customs_procedures/(\d+)'] = "admin_customs_procedures/index/(\d+)";
$route['admin_customs_procedures/insert'] = "admin_customs_procedures/insert";
$route['admin_customs_procedures/edit/(\d+)'] = "admin_customs_procedures/edit/(\d+)";
$route['admin_customs_procedures/delete/(\d+)'] = "admin_customs_procedures/delete/(\d+)";

$route['admin_forwarding/(\d+)'] = "admin_forwarding/index/(\d+)";
$route['admin_knowledge/(\d+)'] = "admin_knowledge/index/(\d+)";

$route['feed_customs'] = "feed_customs/index";

/* End of file routes.php */
/* Location: ./application/config/routes.php */
